/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

.plan-step {
	display: flex;
	margin-bottom: 16px;
}

.plan-step.plan-step-last {
	margin-bottom: 32px;
}

.plan-step.plan-step-will-be-dropped {
	opacity: 0.65;
}
.plan-step-timeline {
	display: flex;
	flex-direction: column;
}
.plan-step-content {
	flex-grow: 1;
}
.plan-step-timeline-line {
	position: relative;
	width: 32px;
	flex-grow: 1;
	display: flex;
	justify-content: center;
}
.plan-step:not(.plan-step.plan-step-last) .plan-step-timeline-line::before {
	content: '';
	position: absolute;
	width: 1px;
	height: calc(100% + 16px);
	background-color: var(--vscode-tree-indentGuidesStroke);
}

.plan-step.plan-step-will-be-dropped .plan-step-timeline-line::before {
	background-color: transparent;
	background-image: linear-gradient(to bottom, var(--vscode-tree-indentGuidesStroke), var(--vscode-tree-indentGuidesStroke) 50%, transparent 50%, transparent);
	background-size: 10px 10px;
}

.plan-step-header {
	display: flex;
}

.plan-step-summary {
	display: flex;
}

.plan-step-chevron {
	flex-shrink: 0;
	transition: transform 0.1s;
	margin-left: 8px;
	color: var(--vscode-gitDecoration-ignoredResourceForeground);
	margin-right: 12px;
}

.plan-step-chevron.plan-step-chevron-flipped {
	transform: translateY(2px) rotateX(180deg);
}

.plan-step-title {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

:is(.plan-step-review-buttons, .plan-step-loading-buttons, .plan-step-plan-buttons) {
	display: flex;
}

.plan-step-stop-button {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	display: grid;
	justify-content: center;
	align-items: center;
}
@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}
.plan-step-stop-button .plan-step-spinner-icon {
	animation: spin 1s linear infinite;
}
.plan-step-stop-button :is(.plan-step-stop-icon, .plan-step-spinner-icon) {
	grid-area: 1 / -1 / 1 / -1;
}
.plan-step-stop-button:is(:focus, :hover) {
	background-color: var(--vscode-button-hoverBackground);
}
.plan-step-stop-button :is(.plan-step-stop-icon, .plan-step-spinner-icon) {
	transition: opacity ease 0.1s, transform ease 0.1s;
}
.plan-step-stop-button:is(:focus, :hover) .plan-step-spinner-icon,
.plan-step-stop-button .plan-step-stop-icon {
	opacity: 0;
	transform: scale(0.6);
}
.plan-step-stop-button .plan-step-spinner-icon,
.plan-step-stop-button:is(:focus, :hover) .plan-step-stop-icon {
	opacity: 1;
	transform: scale(1);
}
.plan-step-summary {
	width: 32px;
	padding-block: 8px;
	flex-grow: 1;
}
.plan-step-feedback {
	display: flex;
	align-items: end;
	gap: 4px;
}
.plan-step-submit-feedback {
	display: flex;
	align-items: start;
	gap: 4px;
	padding-inline: 4px;
	padding-block: 2px;
	border-radius: 2px;
	white-space: nowrap;
	margin-bottom: 6px;
	color: var(--vscode-button-foreground);
	background-color: var(--vscode-button-background);
}
.plan-step-submit-feedback .plan-step-retry-icon {
	margin-top: 1px;
}
.plan-step-submit-feedback:hover {
	background-color: var(--vscode-button-hoverBackground);
}
.plan-step-feedback-editor {
	flex-grow: 1;
}
:is(.plan-step-indicator, .plan-step-reject-changes, .plan-step-accept-changes, .plan-step-enter-feedback, .plan-step-cancel-feedback, .plan-step-implement-until, .plan-step-add-step, .plan-step-drop-step) {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 1px;
}
:is(.plan-step-summary, .plan-step-stop-button, .plan-step-reject-changes, .plan-step-accept-changes, .plan-step-enter-feedback, .plan-step-cancel-feedback, .plan-step-implement-until, .plan-step-add-step, .plan-step-drop-step):is(:active, :hover) {
	background-color: var(--vscode-toolbar-hoverBackground);
	cursor: pointer;
}
:is(.plan-step-stop-button, .plan-step-reject-changes, .plan-step-accept-changes, .plan-step-enter-feedback, .plan-step-cancel-feedback):hover svg {
	filter: brightness(1.1);
}
